Marquee #2

This script scrolls a message from right to left and left to right, using the substr function to cut the message smaller and smaller and string addition to make the message larger and larger. Watch the messages bounce back and forth.


Discussion

Like previous scripts, this JavaScript sets an initial timeout in the BODY that is renewed in a function call. Since the rightward scroll is slower than the leftward scroll, the string increases in size by two going right and decreases in size by one going left.
Copyright ©2000 by Charles River Media, All Rights Reserved